package com.building18.pojo.enums;

import lombok.Getter;

@Getter
public enum BuildingCode {

    DELETE_BUILDING_SUCCESS(200,"删除成功"),
    DELETE_BUILDING_FAIL(500,"删除楼宇失败,有房屋与其绑定"),

    SAVE_PERMS_SUCCESS(200,"批量添加权限成功"),
    SAVE_PERMS_FAIL(500,"批量添加权限失败"),

    DOWNLOAD_SUCCESS(200,"下载链接触发成功"),
    DOWNLOAD_FAIL(500,"下载链接触发失败"),

    USERNAME_OR_PASSWORD_ERROR(500,"用户名或密码错误!"),
    USER_STATUS_ERROR(500,"用户状态被冻结!请稍后再试"),

    ROLE_HAS_USER_RELATION(500, "该角色存在用户关联，无法删除，请先解除用户与该角色的关联"),
    ROLE_HAS_PERMISSION_RELATION(500, "该角色存在权限关联，无法删除，请先解除用户与该权限的关联");

    private final Integer code;
    private final String message;

    BuildingCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

}
